package com.highspeed.bdk.gateway.socket.analyze.message.preset_deploy.resolver;

import com.highspeed.bdk.gateway.Util;
import com.highspeed.bdk.gateway.socket.analyze.message.preset_deploy.base.MessageResolver;

import java.util.Map;

public class NodeFuncResolver extends MessageResolver {

    @Override
    protected Map doResolveBody(byte[] response) {
        short nodeId = Util.getShort(response, getOffset());
        offset2();
        logger.info("nodeId..........." + nodeId);

        int appId = Util.getInt(response, getOffset());
        offset4();
        logger.info("appId..........." + appId);

        String appName = Util.subBytesToString(response, getOffset(), 32);
        offsetN(32);
        logger.info("appName..........." + appName);
        return getContainer();
    }
}
